<!-- src/views/PublicActivities.vue -->
<template>
  <div class="public-activities">
    <h2>公开活动列表</h2>
    <ul>
      <li v-for="activity in activities" :key="activity.id">
        <router-link :to="{ name: 'public-activity-detail', params: { id: activity.id } }">
          {{ activity.title }} - {{ activity.date }}
        </router-link>
      </li>
    </ul>
  </div>
</template>

<script>
import activities from '@/data/activities.js';

export default {
  data() {
    return {
      activities: activities
    };
  }
};
</script>

<style scoped>
.public-activities {
  padding: 20px;
}

.public-activities h2 {
  text-align: center;
}

.public-activities ul {
  list-style-type: none;
  padding: 0;
}

.public-activities li {
  margin-bottom: 10px;
}

.public-activities a {
  text-decoration: none;
  color: #42b983;
}

.public-activities a:hover {
  text-decoration: underline;
}
</style>